package com.access.boot.apisdk;

import java.util.Map;

/**
 * @author Yangzhen
 * @date 2023/1/9 15:41
 * @since 1.0.0
 */
public class SdkContext {

    public final String clientId;
    public final String secret;
    public final Map extras;
    public final String token;
    public final String host;
    public final Map<String, String> headers;

    public SdkContext(String clientId, String secret, Map extras, String token, String host, Map<String, String> headers) {
        this.clientId = clientId;
        this.secret = secret;
        this.extras = extras;
        this.token = token;
        this.host = host;
        this.headers = headers;
    }

    public SdkContext(String host, String clientId, String secret, String token, Map extras, Map<String, String> headers) {
        this.clientId = clientId;
        this.secret = secret;
        this.extras = extras;
        this.token = token;
        this.host = host;
        this.headers = headers;
    }

    public static SdkContext newInstance(String host, String clientId, String secret, String token) {
        return new SdkContext(host, clientId, secret, token, null, null);
    }
}
